package com.kfgj.hkp.dao.area.impl;

import com.kfgj.hkp.common.dataaccess.mybatis.AbstractMyBatisDao;
import com.kfgj.hkp.dao.area.ICompanyAreaDbDao;
import com.kfgj.hkp.entity.area.CompanyAreaEntity;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @version 1.0
 * @description TODO
 * @auth davidCun
 * @date 2018/7/3 09:30
 */
@Repository
public class CompanyAreaDbDaoImpl extends AbstractMyBatisDao<CompanyAreaEntity,Long> implements ICompanyAreaDbDao {
    @Override
    public CompanyAreaEntity findDeptAreaEntityByAreaCode(String areaCode) {
        return this.getSqlSession().selectOne(this.mapperNamespace+"findDeptAreaEntityByAreaCode",areaCode);
    }

    @Override
    public List<CompanyAreaEntity> findDeptAreaEntityByParentCode(String parentCode) {
        return this.getSqlSession().selectList(this.mapperNamespace+"findDeptAreaEntityByParentCode",parentCode);
    }
}
